<template>
	<view>
		<view class="evaluate_list">
			<LoadMore ref="LoadMore" id="LoadMore" :diffHeight="50" :initData="initData" @dataRefresh='dataRefresh'>
				<text></text>
				<view class="evaluate_lbos" v-for="(item,index) in list" :key="index">
					<view class="evaluate_bos">
						<image class="evaluate_image" mode="aspectFill" :src="item.user_info.headimgurl"></image>
						<view class="evaluate_all">
							<view class="evaluate_box">
								<view class="font15 font-323232 font-b">{{item.user_info.nickname}}</view>
								<view class="font14 font-969696">{{item.type=='consultation_order'?'图文问诊':item.type=='consultation_video_order'?'视频问诊':'报告解读'}}</view>
							</view>
							<view class="evaluate_box">
								<view class="font15 font-323232 evaluate_rate">
									<text class="font14 font-323232">评分</text>
									<uni-rate :size="14" activeColor="#e9a944" allow-half :readonly="true" :value="item.fraction" />
								</view>
								<view class="font14 font-969696">{{$u.timeFormat(item.createtime, 'yyyy/mm/dd')}}</view>
							</view>
						</view>
					</view>
					<view class="evaluate_info">
						{{item.content?item.content:'暂无'}}
					</view>
				</view>
			</LoadMore>
		</view>
	</view>
</template>

<script>
	import LoadMore from "@/components/loadMore.vue";
	export default {
		components: {
			LoadMore
		},
		data() {
			return {
				id:null,
				list: [], //数据
				//传参数据
				initData: {
					url: 'listComment', //接口
					//data里得传参
					param: {
						doctor_id:this.id
					},
				},
			}
		},
		onLoad: function(options) {
			this.id = options.id
			this.initData.param.doctor_id = options.id
		},
		methods: {
			//返回数据
			dataRefresh(e) {
				// e.forEach(item=>{
				// 	item.createtime = this.$base.formatTime(new Date(item.createtime *
				// 		1000), "yyyy/MM/dd")
				// })
				this.list = e
			},
		}
	}
</script>

<style>
	/* 数据 */
	.evaluate_list {
		padding-top: 50rpx;
		width: 750rpx;
	}

	.evaluate_lbos {
		border-bottom: 1rpx #f6f6f6 solid;
		margin-bottom: 30rpx;
		padding: 0 30rpx 20rpx 30rpx;
	}

	.evaluate_bos {
		width: 690rpx;
		display: flex;
		align-items: center;
		height: 140rpx;

	}

	.evaluate_image {
		width: 100rpx;
		height: 100rpx;
		border-radius: 50rpx;
	}

	.evaluate_all {
		width: 590rpx;
		height: 140rpx;
	}

	.evaluate_box {
		height: 70rpx;
		width: 590rpx;
		padding-left: 32rpx;
		padding-right: 32rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.evaluate_rate {
		display: flex;
		align-items: center;
	}

	.evaluate_rate text {
		margin-right: 10rpx;
	}

	.evaluate_info {
		width: 690rpx;
		background-color: #f9f9f9;
		border-radius: 5rpx;
		font-size: 28rpx;
		color: #969696;
		padding: 26rpx;
	}
</style>
